<template>
<el-dialog v-model="visible" v-bind="$attrs" v-on="$listeners">
    <slot name="content"></slot>
    <template #footer>
      <span>
        <slot name="footer"></slot>
      </span>
    </template>
  </el-dialog>
</template>

<script setup name="TDialog">

const visible = ref(false)

// 关闭dialog的函数
const close = () => {
  visible.value = false
}
// 打开dialog的函数
const open = () => {
  visible.value = true
}

defineExpose({
  close,
  open,
})
</script>

<style scoped lang="scss"></style>